***descripitive statistics
sum central dem rural tar_scale beijing minority mil organize

***vif
reg central dem rural tar_scale beijing minority mil organize
vif

***logit analysis
logit central dem rural tar_scale beijing, robust
eststo m1
logit central dem rural tar_scale beijing minority mil organize, robust
eststo m2
logit central dem rural tar_scale beijing minority mil organize if power==0, robust
eststo m3
logit central dem rural tar_scale beijing minority mil organize if power==1, robust
eststo m4
esttab m1 m2 m3 m4

**margins
logit central dem rural tar_scale beijing minority mil organize, robust
margins, dydx(*) post

coefplot, drop(_cons) coeflabels(dem="Democracy" rural="Rural" tar_scale="Size of Protest" beijing="Beijing" minority="Minority" mil="Veteran" organize="Organization") xline(0) xtitle(Predicted Probability of Targeting the Center) scheme(s1mono)
***coefplot rc || vc, drop(_cons) headings(2.control_nominal="{bf:Electoral Control}" 1.membership="{bf:Party Affiliation}" 2.type_employ2="{bf:Employment Status}") title(Figure 1 Voter Turnout in Chinese Grassroots Elections) coeflabels(demo_cons="Democratic Consciousness" 2.control_nominal= "Outcome Control" 3.control_nominal="Candidate Control" 4.control_nominal="No Real Elections" 5.control_nominal="Don't Know" gender="Male" age="Age" agesq="Age Square" minority="Non-Han Ethnicity" edu="Education Level" linc="Logged Income" union="Union Membership" 1.membership="Party Member" 2.membership="Youth League" 3.membership="Democratic Parties" 2.type_employ2="VC/RC Employees" 3.type_employ2="Private Business Employees" 4.type_employ2="Self-Employed" 5.type_employ2="Farmers" 6.type_employ2="Unemployed") xline(0) xtitle(Predicted Probability of Voting) scheme(s1mono)  mlabel format(%9.2g) mlabposition(0) msymbol(i)
ci(95box) ciopts(recast(.rbar) barwidth(. 0.35) color(. white)) 

***mlogit
mlogit gov_tar rural dem tar_scale beijing minority mil organize, base(1)
